package mshop.com.schild_kotlin.mvp.model

import android.content.Context
import io.reactivex.Observable
import mshop.com.schild_kotlin.entitys.HomeBean
import mshop.com.schild_kotlin.mvp.base.BaseModel

/**
 * Created by mayi on 2018/5/24.
 * @Autor CaiWF
 * @Email 401885064@qq.com
 * @TODO
 */
class HomeModel :BaseModel(){

    fun loadData(context: Context, isFirst: Boolean, data: String): Observable<HomeBean>? {
        when (isFirst) {
            true -> return getApiService(context).getHomeData()

            false -> return getApiService(context).getHomeMoreData(data, "2")
        }
    }


}